#ifndef __MCINCIDENTCONSTRAINT_H_
#define __MCINCIDENTCONSTRAINT_H_

#include <MCConstraint.h>
#include <IGripPoint.h>
#include <cg_api.h>
#include <cg_geometric_api.h>

class MCIncidentConstraintVisual;

class MCIncidentContraint : public MCConstraint
{
public:

    MCIncidentContraint(IGripPoint *grip1, IGripPoint *grip2);
    ~MCIncidentContraint();

    void resolve() override;

public:

    IGripPoint *_grip1;
    IGripPoint *_grip2;

private:

    cg::Cnstr makeIncident(cg::Point &p1, cg::Point &p2);

private:

    cg::Solver _solver;
    MCPoint2D _rootPoint;
    ICanvas *_presenter;
    MCIncidentConstraintVisual *_label;

};

#endif // !__MCINCIDENTCONSTRAINT_H_
